import React, { useEffect, useState } from 'react';
import { Space, Table, Tag } from 'antd';
import type { ColumnsType } from 'antd/es/table';
import {getservicelog} from '@/api/service'
import {initTable} from '@/hoc/index.js'


interface DataType {
  key: string;
  name: string;
  age: number;
  address: string;
  tags: string[];
}

const columns: ColumnsType<DataType> = [
  {
    title: 'ID',
    dataIndex: 'vsid',
    key: 'vsid',
  },
  {
    title: '游客id',
    dataIndex: 'visitor_id',
    key: 'visitor_id',
  },
  {
    title: '游客名称',
    dataIndex: 'visitor_name',
    key: 'visitor_name',
  },
  {
    title: 'IP',
    dataIndex: 'visitor_ip',
    key: 'visitor_ip',
  },
  {
    title: '接待客服',
    dataIndex: 'kefu_name',
    key: 'kefu_name',
  },
  {
    title: '开始时间',
    dataIndex: 'start_date',
    key: 'start_date',
  },
  {
    title: '结束时间',
    dataIndex: 'end_date',
    key: 'end_date',
    render: text => <span>
      {text?text:"无"}
    </span>,
  },
];


type Props = {};

const servicelog = (props: any) => {
  
  return (
    <div>
      <Table columns={columns} dataSource={props.data} />
    </div>
  );
};

// export default initTable(getservicelog,servicelog)
export default initTable(getservicelog)(servicelog)
